﻿using System;
using System.Collections.Generic;

namespace 链表
{
    internal class Program
    {
        static void Main(string[] args)
        {

            LinkedList<int> linkedList = new LinkedList<int>();
            linkedList.AddLast(1);
            linkedList.AddLast(2);
            linkedList.AddFirst(0);
            foreach (var item in linkedList)
            {
                Console.WriteLine(item); // 输出 0, 1, 2
            }
        }
    }
}
